3.9 \(\int (a+\frac{e x}{2}+c x^2)^p (2 a+e x+2 c x^2)^q \, dx\)

Optimal. Leaf size=136 \[ -\frac{2^{q+1} \left (-\frac{-\sqrt{e^2-16 a c}+4 c x+e}{\sqrt{e^2-16 a c}}\right )^{-p-q-1} \left (2 a+2 c x^2+e x\right )^{p+q+1} \, _2F_1\left (-p-q,p+q+1;p+q+2;\frac{e+4 c x+\sqrt{e^2-16 a c}}{2 \sqrt{e^2-16 a c}}\right )}{(p+q+1) \sqrt{e^2-16 a c}} \]

[Out]

-((2^(1 + q)*(-((e - Sqrt[-16*a*c + e^2] + 4*c*x)/Sqrt[-16*a*c + e^2]))^(-1 - p - q)*(2*a + e*x + 2*c*x^2)^(1
+ p + q)*Hypergeometric2F1[-p - q, 1 + p + q, 2 + p + q, (e + Sqrt[-16*a*c + e^2] + 4*c*x)/(2*Sqrt[-16*a*c + e
^2])])/(Sqrt[-16*a*c + e^2]*(1 + p + q)))

________________________________________________________________________________________

Rubi [A]  time = 0.102988, antiderivative size = 136, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.065, Rules used = {967, 624} \[ -\frac{2^{q+1} \left (-\frac{-\sqrt{e^2-16 a c}+4 c x+e}{\sqrt{e^2-16 a c}}\right )^{-p-q-1} \left (2 a+2 c x^2+e x\right )^{p+q+1} \, _2F_1\left (-p-q,p+q+1;p+q+2;\frac{e+4 c x+\sqrt{e^2-16 a c}}{2 \sqrt{e^2-16 a c}}\right )}{(p+q+1) \sqrt{e^2-16 a c}} \]

Antiderivative was successfully verified.

[In]

Int[(a + (e*x)/2 + c*x^2)^p*(2*a + e*x + 2*c*x^2)^q,x]

[Out]

-((2^(1 + q)*(-((e - Sqrt[-16*a*c + e^2] + 4*c*x)/Sqrt[-16*a*c + e^2]))^(-1 - p - q)*(2*a + e*x + 2*c*x^2)^(1
+ p + q)*Hypergeometric2F1[-p - q, 1 + p + q, 2 + p + q, (e + Sqrt[-16*a*c + e^2] + 4*c*x)/(2*Sqrt[-16*a*c + e
^2])])/(Sqrt[-16*a*c + e^2]*(1 + p + q)))

Rule 967

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.)*((d_) + (e_.)*(x_) + (f_.)*(x_)^2)^(q_.), x_Symbol] :> Dist[(c/f)
^p, Int[(d + e*x + f*x^2)^(p + q), x], x] /; FreeQ[{a, b, c, d, e, f, p, q}, x] && EqQ[c*d - a*f, 0] && EqQ[b*
d - a*e, 0] && (IntegerQ[p] || GtQ[c/f, 0]) && ( !IntegerQ[q] || LeafCount[d + e*x + f*x^2] <= LeafCount[a + b
*x + c*x^2])

Rule 624

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, -Simp[((a + b*x + c*
x^2)^(p + 1)*Hypergeometric2F1[-p, p + 1, p + 2, (b + q + 2*c*x)/(2*q)])/(q*(p + 1)*((q - b - 2*c*x)/(2*q))^(p
 + 1)), x]] /; FreeQ[{a, b, c, p}, x] && NeQ[b^2 - 4*a*c, 0] &&  !IntegerQ[4*p]

Rubi steps

\begin{align*} \int \left (a+\frac{e x}{2}+c x^2\right )^p \left (2 a+e x+2 c x^2\right )^q \, dx &=2^{-p} \int \left (2 a+e x+2 c x^2\right )^{p+q} \, dx\\ &=-\frac{2^{1+q} \left (-\frac{e-\sqrt{-16 a c+e^2}+4 c x}{\sqrt{-16 a c+e^2}}\right )^{-1-p-q} \left (2 a+e x+2 c x^2\right )^{1+p+q} \, _2F_1\left (-p-q,1+p+q;2+p+q;\frac{e+\sqrt{-16 a c+e^2}+4 c x}{2 \sqrt{-16 a c+e^2}}\right )}{\sqrt{-16 a c+e^2} (1+p+q)}\\ \end{align*}

Mathematica [A]  time = 0.138064, size = 142, normalized size = 1.04 \[ \frac{2^{q-2} \left (-\sqrt{e^2-16 a c}+4 c x+e\right ) \left (\frac{\sqrt{e^2-16 a c}+4 c x+e}{\sqrt{e^2-16 a c}}\right )^{-p-q} (2 a+x (2 c x+e))^{p+q} \, _2F_1\left (-p-q,p+q+1;p+q+2;\frac{-e-4 c x+\sqrt{e^2-16 a c}}{2 \sqrt{e^2-16 a c}}\right )}{c (p+q+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + (e*x)/2 + c*x^2)^p*(2*a + e*x + 2*c*x^2)^q,x]

[Out]

(2^(-2 + q)*(e - Sqrt[-16*a*c + e^2] + 4*c*x)*((e + Sqrt[-16*a*c + e^2] + 4*c*x)/Sqrt[-16*a*c + e^2])^(-p - q)
*(2*a + x*(e + 2*c*x))^(p + q)*Hypergeometric2F1[-p - q, 1 + p + q, 2 + p + q, (-e + Sqrt[-16*a*c + e^2] - 4*c
*x)/(2*Sqrt[-16*a*c + e^2])])/(c*(1 + p + q))

________________________________________________________________________________________

Maple [F]  time = 2.905, size = 0, normalized size = 0. \begin{align*} \int \left ( a+{\frac{ex}{2}}+c{x}^{2} \right ) ^{p} \left ( 2\,c{x}^{2}+ex+2\,a \right ) ^{q}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+1/2*e*x+c*x^2)^p*(2*c*x^2+e*x+2*a)^q,x)

[Out]

int((a+1/2*e*x+c*x^2)^p*(2*c*x^2+e*x+2*a)^q,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (2 \, c x^{2} + e x + 2 \, a\right )}^{q}{\left (c x^{2} + \frac{1}{2} \, e x + a\right )}^{p}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+1/2*e*x+c*x^2)^p*(2*c*x^2+e*x+2*a)^q,x, algorithm="maxima")

[Out]

integrate((2*c*x^2 + e*x + 2*a)^q*(c*x^2 + 1/2*e*x + a)^p, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (2 \, c x^{2} + e x + 2 \, a\right )}^{q}{\left (c x^{2} + \frac{1}{2} \, e x + a\right )}^{p}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+1/2*e*x+c*x^2)^p*(2*c*x^2+e*x+2*a)^q,x, algorithm="fricas")

[Out]

integral((2*c*x^2 + e*x + 2*a)^q*(c*x^2 + 1/2*e*x + a)^p, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+1/2*e*x+c*x**2)**p*(2*c*x**2+e*x+2*a)**q,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (2 \, c x^{2} + e x + 2 \, a\right )}^{q}{\left (c x^{2} + \frac{1}{2} \, e x + a\right )}^{p}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+1/2*e*x+c*x^2)^p*(2*c*x^2+e*x+2*a)^q,x, algorithm="giac")

[Out]

integrate((2*c*x^2 + e*x + 2*a)^q*(c*x^2 + 1/2*e*x + a)^p, x)